package com.esri.core.tasks.geodatabase;

import com.esri.core.internal.tasks.PollingHelper;
import com.esri.core.internal.tasks.b.b;
import com.esri.core.io.UserCredentials;
import com.esri.core.tasks.geodatabase.GeodatabaseStatusInfo;

/* loaded from: classes.dex */
final class GeodatabaseStatusPollHelper implements PollingHelper.StatusCallback<GeodatabaseStatusInfo, GeodatabaseStatusInfo.Status> {
    /* JADX WARN: Can't rename method to resolve collision */
    @Override // com.esri.core.internal.tasks.PollingHelper.StatusCallback
    public GeodatabaseStatusInfo getStatusObject(String str, UserCredentials userCredentials) throws Exception {
        if (str != null) {
            return new b(str, userCredentials).execute();
        }
        return new GeodatabaseStatusInfo(str);
    }

    @Override // com.esri.core.internal.tasks.PollingHelper.StatusCallback
    public GeodatabaseStatusInfo.Status getStatus(GeodatabaseStatusInfo geodatabaseStatusInfo) {
        return geodatabaseStatusInfo.getStatus();
    }

    @Override // com.esri.core.internal.tasks.PollingHelper.StatusCallback
    public boolean isComplete(GeodatabaseStatusInfo.Status status) {
        return GeodatabaseStatusInfo.Status.COMPLETED.equals(status) || GeodatabaseStatusInfo.Status.COMPLETED_WITH_ERRORS.equals(status) || GeodatabaseStatusInfo.Status.FAILED.equals(status) || GeodatabaseStatusInfo.Status.EXCEPTION.equals(status);
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // com.esri.core.internal.tasks.PollingHelper.StatusCallback
    public GeodatabaseStatusInfo determineFailedStatus(Exception exc) {
        return new GeodatabaseStatusInfo(exc);
    }
}
